#include<stdio.h>//一篇文章有3行，每行有30个字符
int main()
{
    int i,j,upp,low,dig,spa,oth;
    char text[3][80];
    upp=low=dig=spa=oth=0;
    for(i=0;i<3;i++)
    {
        printf("--------请输入第%d行的字符----------\n",i+1);
        gets(text[i]);
        for(j=0;j<80&&text[i][j]!='\0';j++)
            {
                if(text[i][j]>='A'&&text[i][j]<='Z')
                    upp++;
            
            else if (text[i][j]>='\a'&&text[i][j]<='z')
                low++;
            else if(text[i][j]>='0'&&text[i][j]<='9')
                dig++;
            else if(text[i][j]==' ')
                spa++;
            else
                oth++;
            }
            
    }
    printf("\nupper is %5d\n",upp);
    printf("lower is %5d\n",low);
    printf("digit is %5d\n",dig);
    printf("space is %5d\n",spa);
    printf("other is %5d\n",oth);
    return 0;
    

}